<%-- 
    Document   : editworkProject
    Created on : Jul 28, 2012, 10:42:22 AM
    Author     : VANANH
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/> 
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jq.date.js"></script>  
        <link rel="stylesheet" type="text/css" href="../css/ui.datepicker.css"/>
    </head>
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){
              
          
            //   validateform("form-input-customer");
        });

    </script>
    <style type="text/css">
        #ui-datepicker-div
        {
            z-index: 9999999;
        }
        html{visible : true}


    </style>
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){    
            $j('input#leavedate1,input#leavedate2').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
            $j('input#leavedate3,input#leavedate4').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
            $j('input#dateStart, input#dateEnd').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
            //           // $j('#timepicker').timepicker();
            //             //   $j('#timepicker2').timepicker();               
            //               // $j('.sumbitEmp').attr('disabled', true);
            //                $j("#dateEnd").live("change",function(){
            //                    var DateToValue = $j("#dateStart").val();
            //                    var DateFromValue = $j("#dateEnd").val();
            //                
            //                    if (Date.parse(DateToValue) <= Date.parse(DateFromValue)) {
            //                       $j(".alert").text("");
            //                         $j('.sumbitEmp').attr('disabled', false);
            //                    }else{
            //                          $j('.sumbitEmp').attr('disabled', true);
            //                      $j(".alert").text("Chú ý: Ngày h?t h?n l?n hon ngày c?p");
            //                    }
            //                });
            ////                $j("#dateStart").live("change",function(){
            ////                    var DateToValue = $j("#dateStart").val();
            ////                    var DateFromValue = $j("#dateEnd").val();
            ////                
            ////                    if (Date.parse(DateToValue) <= Date.parse(DateFromValue)) {
            ////                       $j(".alert").text("");
            ////                         $j('.sumbitEmp').attr('disabled', false);
            ////                    }else{
            ////                          $j('.sumbitEmp').attr('disabled', true);
            ////                      $j(".alert").text("Chú ý: Ngày h?t h?n l?n hon ngày c?p");
            ////                    }
            ////                });
            
            $j(".addPer").live("click",function(){
                $j(this).next().css('display','block');
            });
            $j(".close").live("click",function(){
                $j(this).parent().parent().css('display','none');
            });
            $j('.check_selectA').live('click',function(){
                       
                var lang= $j(this).attr("lang");
                var boool;
                if( $j(this).is(":checked"))
                {
                    boool = true;
                    var hoten = $j(this).parent().parent().next().text();
                    var hoten1 =  $j(this).parent().parent().parent().parent().parent().parent().parent().parent().next().children().text();
                     
                    var aaa = hoten+" ;"+hoten1;
                        
                    $j(this).parent().parent().parent().parent().parent().parent().parent().parent().next().children().text(aaa);
                    $j.post("customer4tour.jsp?action=addCusp100&p100="+lang+"&valueC="+boool,function(data){
                            
                    });
                }
                else
                {
                    boool = false;
                    $j.post("customer4tour.jsp?action=addCusp100&p100="+lang+"&valueC="+boool,function(data){
                            
                    });
                }
                            
               
            });
        });
    </script>
    <style type="text/css">
        .bg_department{
            height: 68 !important;
        }

        .feild_sex tr td {
            float:left !important;
            width: 80px !important; 
            height: 20px;

        }
        .feild_sex tr td label {
            text-align: center !important;
            width: 88px !important; 
            color: black;
            margin-top: 20px;
            font-size: 12px;
            margin-left: -55px;
        }
        .feild_sex tr td input[type="radio"]{
            float:left !important;

        }
        .ui-datepicker-trigger1{
            cursor: pointer;
            position: absolute;
        }
        .itemimg{
            float:left;
            margin-top: -5px;
            width: 50%;

        }
        .field_normal{            
            width:100%; 
        }
        .field_pink{
            background-color: #D1E1F1; 

        }
        .lbl_editWork{
            float: left !important;
            width: 115px !important;
            /*  text-align:right !important;
              
              width: 95px !important;
              padding-top: 10px!important;
              padding-bottom: 0px; */

        }

        .date_editWork{
            width: 250px;
            float: left;
            margin-top: 8px;
        }
        img.ui-datepicker-trigger{
            margin-top: 3px !important;
        }
        .priority_work{
            width:370px;

            float:left;
            color: black;
        }
        .div_null{
            width: 290px;
            height: 20px;
            float: left;
        }

        .demo_fieldset {
            border: 1px solid #ACBECE;
            margin: 10px;
        }
        .a{
            display: none;
            position: absolute;
            z-index: 99999;
        }
    </style>
    <f:view>
        <a4j:form id="form-input-customer" >
            <body style=" float:left; width:auto; height:auto; margin:0px;">
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
                <div class="popup" style="height:723px; width:630px">
                    <div class="popup-header">
                        <div class="title"><h:outputText value="CẬP NHẬT THÔNG TIN KHÁCH HÀNG THEO TOUR"/></div>
                    </div>
                    <div class="popup-content">
                        <div class="main_content">
                            <div class="form_item_content" style="margin-top:15px; margin-left: 0px;margin-bottom: 10px;" >
                                <div class="item_content" style="display:block">
                                    <fieldset class="demo_fieldset" style="float: left;width: 96.5%;">
                                        <legend style="font-weight: bold;color: #5537FF;font-size: 10px;">DANH SÁCH NGƯỜI CẬP NHẬT</legend>
                                        <div class="fields_input" style="width:99%;float: left;">
                                            <div class="addPer">Thêm người</div>
                                            <div class="a" style="width: 200px;">
                                                <div style="float: left;width: 100%">
                                                    <rich:dataTable value="#{v030Controller.list}" var="cus" rowKeyVar="index" rows="5000">
                                                        <rich:column>
                                                            <f:facet name="header">
                                                                <h:outputText value="STT"/>
                                                            </f:facet>
                                                            <div style="text-align: center;">
                                                                <h:outputText value="#{index+1}"/>
                                                            </div>

                                                        </rich:column>
                                                        <rich:column>
                                                            <f:facet name="header">
                                                                <h:outputText value="Action"/>
                                                            </f:facet>
                                                            <div style="text-align: center;">
                                                                <h:selectBooleanCheckbox value="#{cus.selected}" styleClass="check_selectA" lang="#{cus.pn100}"/>
                                                            </div>



                                                        </rich:column>
                                                        <rich:column>
                                                            <f:facet name="header">
                                                                <h:outputText value="Họ tên"/>
                                                            </f:facet>
                                                            <h:outputText value="#{cus.hoten}"/>
                                                        </rich:column>
                                                    </rich:dataTable>
                                                </div>
                                                <div style="float: left;width: 88%;height: 30px;background-color: #C7C7C7">
                                                    <div class="buttonsave close" style="float: right;">ĐÓNG</div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="fields_input" style="width:99%;float: left;padding: 3px;">

                                            <h:inputTextarea value="#{v030Controller.listpersonalforTour}" style="margin-left:1px;height:100px;width:99%;" />

                                        </div>

                                    </fieldset>
                                    <fieldset class="demo_fieldset" style="float: left;">
                                        <legend style="font-weight: bold;color: #5537FF;font-size: 10px;">THÔNG TIN NƠI KHỞI HÀNH</legend>
                                        <div  class="field_normal" style="height:70px">
                                            <div class="fields_input" style="width: 50%;float: left;">
                                                <label class="lbl_editWork"><h:outputText value="Nơi khởi hành"/> <span>: </span></label>
                                                <h:inputText value="#{v030Controller.VV041}" styleClass="required" id="cusname" style="margin-left:1px;" />

                                            </div>
                                            <div class="fields_input" style="width: 50%;float: left;">
                                                <label class="lbl_editWork" style="width:104px !important"><h:outputText value="Vé máy bay"/> <span>: </span></label>
                                                <h:inputText value="#{v030Controller.VV038}" styleClass="required" id="tickets" style="margin-left:1px;" />

                                            </div>
                                            <div class="fields_input" style="width: 50%;float: left;">
                                                <label class="lbl_editWork"><h:outputText value="Ngày đi"/> <span>: </span></label>
                                                <input value="<h:outputText value="#{v030Controller.DV047}"><f:convertDateTime pattern="dd/MM/yyyy"/> 
                                                       </h:outputText>" type="text" id="leavedate2" name="leavedate2" class="" />

                                            </div>
                                            <div class="fields_input" style="width: 50%;float: left;">
                                                <label class="lbl_editWork" style="width:104px !important"><h:outputText value="Ngày đến"/> <span>: </span></label>
                                                <input value="<h:outputText value="#{v030Controller.DV048}"><f:convertDateTime pattern="dd/MM/yyyy"/> 
                                                       </h:outputText>" type="text" id="leavedate1" name="leavedate1" class="" />

                                            </div>



                                        </div>


                                        <div class="field_pink" style="height:115px; " >
                                            <div class="fields_input" >    

                                                <label class="lbl_editWork"><h:outputText value="Giờ bay"/>: </label>                                          
                                                <h:inputText value="#{v030Controller.VV045}"  style="margin-left:1px;width:50px;" />
                                                <label class="lbl_editWork" style="width: 55px !important;"><h:outputText value="Giờ đến"/>: </label>                                          
                                                <h:inputText value="#{v030Controller.VV046}"  style="margin-left:1px;width:50px;" />
                                                <label class="lbl_editWork" ><h:outputText value="Chuyến bay"/>:</label>

                                                <h:inputText value="#{v030Controller.VV042}" styleClass="required" id="tickets2" style="margin-left:1px;" />
                                            </div>

                                            <div class="fields_input" >
                                                <label class="lbl_editWork"><h:outputText value="Hàng không"/>:</label>
                                                <h:inputText value="#{v030Controller.VV043}" styleClass="required" id="tickets3" style="margin-left:1px;" />
                                                <label class="lbl_editWork"><h:outputText value="Loại phòng"/>:</label>
                                                <h:inputText value="#{v030Controller.VV040}" styleClass="required" id="tickets4" style="margin-left:1px;" />
                                            </div>
                                            <div class="fields_input" >
                                                <label class="lbl_editWork"><h:outputText value="Loại xe bus"/>:</label>

                                                <h:selectOneMenu style="margin-left:1px;" value="#{v030Controller.VV039}">
                                                    <f:selectItem itemLabel="1" itemValue="1"/>
                                                    <f:selectItem itemLabel="2" itemValue="2"/>
                                                    <f:selectItem itemLabel="3" itemValue="3"/>
                                                    <f:selectItem itemLabel="4" itemValue="4"/>
                                                    <f:selectItem itemLabel="5" itemValue="5"/>
                                                    <f:selectItem itemLabel="6" itemValue="6"/>
                                                    <f:selectItem itemLabel="7" itemValue="7"/>
                                                    <f:selectItem itemLabel="8" itemValue="8"/>
                                                    <f:selectItem itemLabel="9" itemValue="9"/>
                                                    <f:selectItem itemLabel="10" itemValue="10"/>
                                                    <f:selectItem itemLabel="11" itemValue="11"/>
                                                    <f:selectItem itemLabel="12" itemValue="12"/>
                                                    <f:selectItem itemLabel="13" itemValue="13"/>
                                                    <f:selectItem itemLabel="14" itemValue="14"/>
                                                    <f:selectItem itemLabel="15" itemValue="15"/>
                                                    <f:selectItem itemLabel="16" itemValue="16"/>
                                                    <f:selectItem itemLabel="17" itemValue="17"/>
                                                    <f:selectItem itemLabel="18" itemValue="18"/>
                                                    <f:selectItem itemLabel="19" itemValue="19"/>
                                                    <f:selectItem itemLabel="20" itemValue="20"/>
                                                    <f:selectItem itemLabel="21" itemValue="21"/>
                                                    <f:selectItem itemLabel="22" itemValue="22"/>
                                                    <f:selectItem itemLabel="23" itemValue="23"/>
                                                    <f:selectItem itemLabel="24" itemValue="24"/>
                                                    <f:selectItem itemLabel="25" itemValue="25"/>
                                                    <f:selectItem itemLabel="26" itemValue="26"/>
                                                    <f:selectItem itemLabel="27" itemValue="27"/>
                                                    <f:selectItem itemLabel="28" itemValue="28"/>
                                                    <f:selectItem itemLabel="29" itemValue="29"/>
                                                    <f:selectItem itemLabel="30" itemValue="30"/>


                                                </h:selectOneMenu>
                                                <label class="lbl_editWork" ><h:outputText value="VISA Status"/>:</label>
                                                <h:selectOneMenu style="margin-left:1px;" value="#{v030Controller.VV044}">
                                                    <f:selectItem itemLabel="PD - Đang nhận HS" itemValue="PD"/>
                                                    <f:selectItem itemLabel="PR - Tiến hành" itemValue="PR"/>
                                                    <f:selectItem itemLabel="GR - Được cấp VISA" itemValue="GR"/>
                                                </h:selectOneMenu>




                                            </div>
                                        </div>

                                    </fieldset>

                                    <fieldset class="demo_fieldset" style="float: left;">
                                        <legend style="font-weight: bold;color: #5537FF;font-size: 10px;">THÔNG TIN NƠI KẾT THÚC</legend>
                                        <div  class="field_normal" style="height:70px">
                                            <div class="fields_input" style="width: 50%;float: left;">
                                                <label class="lbl_editWork"><h:outputText value="Nơi khởi hành"/> <span>: </span></label>
                                                <h:inputText value="#{v030Controller.VV041T}" styleClass="required" id="cusname222" style="margin-left:1px;" />

                                            </div>
                                            <div class="fields_input" style="width: 50%;float: left;">
                                                <label class="lbl_editWork" style="width:104px !important"><h:outputText value="Vé máy bay"/> <span>: </span></label>
                                                <h:inputText value="#{v030Controller.VV038T}" styleClass="required" id="tickets222" style="margin-left:1px;" />

                                            </div>
                                            <div class="fields_input" style="width: 50%;float: left;">
                                                <label class="lbl_editWork"><h:outputText value="Ngày đi"/> <span>: </span></label>
                                                <input value="<h:outputText value="#{v030Controller.DV047T}"><f:convertDateTime pattern="dd/MM/yyyy"/> 
                                                       </h:outputText>" type="text" id="leavedate3" name="leavedate3" class="" />

                                            </div>
                                            <div class="fields_input" style="width: 50%;float: left;">
                                                <label class="lbl_editWork" style="width:104px !important"><h:outputText value="Ngày đến"/> <span>: </span></label>
                                                <input value="<h:outputText value="#{v030Controller.DV048T}"><f:convertDateTime pattern="dd/MM/yyyy"/> 
                                                       </h:outputText>" type="text" id="leavedate4" name="leavedate4" class="" />

                                            </div>



                                        </div>


                                        <div class="field_pink" style="height:115px; " >
                                            <div class="fields_input" >    

                                                <label class="lbl_editWork"><h:outputText value="Giờ bay"/>: </label>                                          
                                                <h:inputText value="#{v030Controller.VV045T}"  style="margin-left:1px;width:50px;" />
                                                <label class="lbl_editWork" style="width: 55px !important;"><h:outputText value="Giờ đến"/>: </label>                                          
                                                <h:inputText value="#{v030Controller.VV046T}"  style="margin-left:1px;width:50px;" />

                                                <label class="lbl_editWork" ><h:outputText value="Chuyến bay đi"/>:</label>

                                                <h:inputText value="#{v030Controller.VV042T}" styleClass="required" id="tickets22222" style="margin-left:1px;" />
                                            </div>

                                            <div class="fields_input" >
                                                <label class="lbl_editWork"><h:outputText value="Hàng không"/>:</label>
                                                <h:inputText value="#{v030Controller.VV043T}" styleClass="required" id="tickets2222222" style="margin-left:1px;" />
                                                <label class="lbl_editWork"><h:outputText value="Loại phòng"/>:</label>
                                                <h:inputText value="#{v030Controller.VV040T}" styleClass="required" id="tickets3434" style="margin-left:1px;" />
                                            </div>
                                            <div class="fields_input" >
                                                <label class="lbl_editWork"><h:outputText value="Loại xe bus"/>:</label>
                                                <h:selectOneMenu style="margin-left:1px;" value="#{v030Controller.VV039T}">
                                                    <f:selectItem itemLabel="1" itemValue="1"/>
                                                    <f:selectItem itemLabel="2" itemValue="2"/>
                                                    <f:selectItem itemLabel="3" itemValue="3"/>
                                                    <f:selectItem itemLabel="4" itemValue="4"/>
                                                    <f:selectItem itemLabel="5" itemValue="5"/>
                                                    <f:selectItem itemLabel="6" itemValue="6"/>
                                                    <f:selectItem itemLabel="7" itemValue="7"/>
                                                    <f:selectItem itemLabel="8" itemValue="8"/>
                                                    <f:selectItem itemLabel="9" itemValue="9"/>
                                                    <f:selectItem itemLabel="10" itemValue="10"/>
                                                    <f:selectItem itemLabel="11" itemValue="11"/>
                                                    <f:selectItem itemLabel="12" itemValue="12"/>
                                                    <f:selectItem itemLabel="13" itemValue="13"/>
                                                    <f:selectItem itemLabel="14" itemValue="14"/>
                                                    <f:selectItem itemLabel="15" itemValue="15"/>
                                                    <f:selectItem itemLabel="16" itemValue="16"/>
                                                    <f:selectItem itemLabel="17" itemValue="17"/>
                                                    <f:selectItem itemLabel="18" itemValue="18"/>
                                                    <f:selectItem itemLabel="19" itemValue="19"/>
                                                    <f:selectItem itemLabel="20" itemValue="20"/>
                                                    <f:selectItem itemLabel="21" itemValue="21"/>
                                                    <f:selectItem itemLabel="22" itemValue="22"/>
                                                    <f:selectItem itemLabel="23" itemValue="23"/>
                                                    <f:selectItem itemLabel="24" itemValue="24"/>
                                                    <f:selectItem itemLabel="25" itemValue="25"/>
                                                    <f:selectItem itemLabel="26" itemValue="26"/>
                                                    <f:selectItem itemLabel="27" itemValue="27"/>
                                                    <f:selectItem itemLabel="28" itemValue="28"/>
                                                    <f:selectItem itemLabel="29" itemValue="29"/>
                                                    <f:selectItem itemLabel="30" itemValue="30"/>


                                                </h:selectOneMenu>
                                                <label class="lbl_editWork" ><h:outputText value="VISA Status"/>:</label>
                                                <h:selectOneMenu style="margin-left:1px;" value="#{v030Controller.VV044T}">
                                                    <f:selectItem itemLabel="PD - Đang nhận HS" itemValue="PD"/>
                                                    <f:selectItem itemLabel="PR - Tiến hành" itemValue="PR"/>
                                                    <f:selectItem itemLabel="GR - Được cấp VISA" itemValue="GR"/>
                                                </h:selectOneMenu>




                                            </div>
                                        </div>

                                    </fieldset>




                                </div>
                            </div>
                            <div class="popup-footer">
                                <div class="alert" style="float: left;"></div>        
                                <div class="buttonsave" onclick="parent.jQuery.fancybox.close(); " style="margin-right:31px;"  ><span><h:outputText value="#{locale.button_close}"/></span></div>
                                <h:inputHidden value="#{v030Controller.pn100}"/>
                                <h:inputHidden value="#{v030Controller.FV050}"/>
                                <h:inputHidden value="#{v030Controller.vn033}"/>
                                <h:inputHidden value="#{v030Controller.vv031}"/>
                                <h:commandButton   action="#{v030Controller.saveV030ForTour}" value="#{locale.button_save}" styleClass="buttonsave">
                                </h:commandButton>                        
                            </div>

                        </div>          
                        </body>
                    </a4j:form>
                </f:view>
                </html>
                <script type="text/javascript">
                    $j(document).ready(function(){
                        yhight = ($j('.popup').height()-90)+"px" ;
                        $j('.main_content').css('height',yhight );
                        $j('.popup-content').css('height',yhight );
                    });
                </script>

